package com.ruoyi.energy.service.impl;

import com.ruoyi.energy.domain.MjPermissionDevice;
import com.ruoyi.energy.mapper.MjPermissionDeviceMapper;
import com.ruoyi.energy.service.IMjPermissionDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 门禁权限设备Service业务层处理
 *
 * @author cjie
 * @date 2021-08-02
 */
@Service
public class MjPermissionDeviceServiceImpl implements IMjPermissionDeviceService {
    @Autowired
    private MjPermissionDeviceMapper mjPermissionDeviceMapper;

    /**
     * 查询门禁权限设备
     *
     * @param id 门禁权限设备ID
     * @return 门禁权限设备
     */
    @Override
    public MjPermissionDevice selectMjPermissionDeviceById(String id) {
        return mjPermissionDeviceMapper.selectMjPermissionDeviceById(id);
    }

    /**
     * 查询门禁权限设备列表
     *
     * @param mjPermissionDevice 门禁权限设备
     * @return 门禁权限设备
     */
    @Override
    public List<MjPermissionDevice> selectMjPermissionDeviceList(MjPermissionDevice mjPermissionDevice) {
        return mjPermissionDeviceMapper.selectMjPermissionDeviceList(mjPermissionDevice);
    }

    /**
     * 新增门禁权限设备
     *
     * @param mjPermissionDevice 门禁权限设备
     * @return 结果
     */
    @Override
    public int insertMjPermissionDevice(MjPermissionDevice mjPermissionDevice) {
        return mjPermissionDeviceMapper.insertMjPermissionDevice(mjPermissionDevice);
    }

    /**
     * 修改门禁权限设备
     *
     * @param mjPermissionDevice 门禁权限设备
     * @return 结果
     */
    @Override
    public int updateMjPermissionDevice(MjPermissionDevice mjPermissionDevice) {
        return mjPermissionDeviceMapper.updateMjPermissionDevice(mjPermissionDevice);
    }

}
